1. Field
The present invention relates to a method, system, and article of manufacture for determining an appropriate extension to use to process one or more input objects to a call in a program
2. Description of the Related Art
An integrated development environment (IDE), also known as an integrated design environment and integrated debugging environment, comprises a computer program or development tool that assists computer programmers in developing software. IDEs normally consist of a source code editor, a compiler and/or interpreter, build-automation tools, and (usually) a debugger. Sometimes a version control system and various tools to simplify the construction of a GUI are integrated as well.
The Eclipse Foundation, Inc. is an open source community whose projects are focused on providing a vendor-neutral open development platform and application frameworks for building software. The Eclipse™ IDE tool provides an open source platform-independent software framework for delivering tools to developers. The Eclipse framework is fully extensible, allowing any third party to supply program code, called extensions or plug-ins, to extend the behavior of other program code at predefined points in the program, referred to as extension points. An extension point comprises a point in the program code where the application developer intended to enable third parties to add extensions to customize behavior at that point. For instance, extension points are used to allow customization of user interfaces, such as menu items, etc., that are provided at a point in the program. Extension points and extensions allows for loose coupling of software components running inside the framework. (Eclipse is a trademark of Eclipse Foundation, Inc.)
An extension point in the code has a schema file providing documentation for the extension point that declares the elements and attributes that extensions (defined by plug-ins) developed for that extension point must declare. The schema is used during plug-in development to detect invalid extensions and to guide the extension developer. Third parties may develop the extensions to use at the declared extension point. Extensions are structured bundles of code and/or data that contribute function to the system. Function can be contributed in the form of code libraries (Java™ classes with public application program interfaces (APIs)), platform extensions, documentation, etc. (Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.)
The extension developer provides metadata about the extension (defined in a plug-in). The extensions are registered during runtime so that they may be discovered for use at a corresponding extension point in the code. The metadata associated with an extension can be used to specialize and customize the behavior of the extension. One common use of the metadata is to specify the object type that a given extension class can process. The dispatcher code for handling an extension point may use the metadata for the registered extensions to determine an extension capable of supporting the object presented at the extension point for processing. The determined extension is then invoked to process the object. This arrangement provides a flexible framework where the input object types at an extension and the algorithms used for processing them can be extended, and evolved with minimal coupling. For example, this pattern is used in the extension point for contributing menu actions to the context menu in the Eclipse framework. Third party developers can create their own menu actions for objects of their choice, without having to modify the base Eclipse code responsible for displaying the views and the context menus.
There is a need in the art to provide improved techniques for selecting extensions to use to process an object at an extension point in the program.